<?php
//打印卷
InitGP(array("action","bid","type")); //初始化變量全局返回
include(INC_PATH."/groupbond.class.php");
$gb=new GroupBondClass();
if(GetNum($bid)){

	$value=$gb->getone($bid);
	if ($value['uid']!=$_USERS['uid']) {
		showmessage("該卷不歸您所有！","-1",false);
	}

}else{
	showmessage("缺少ID參數！","-1",false);
}

if($type == "word"){
	header("Content-type:application/ms-word");
	header("Content-Charset: UTF-8");
	header("Content-Disposition:filename=Buy917團購卷-訂單編號".$value['bid'].".doc");
	include template('word');//包含輸出指定模板
}else{
	include template('print');//包含輸出指定模板
}


?>